package acm.集美大学;

import java.util.Scanner;

public class E寻找帕鲁 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] arr = new int[n + 1];
        for (int i = 1; i < arr.length; i++) {
            arr[i] = sc.nextInt();
        }
        int a = sc.nextInt();
        int b = sc.nextInt();
        int c = (arr[a] + arr[b] + 1) / 2;
        int min=Integer.MAX_VALUE;
        int minI=1;
        for (int i = 1; i < arr.length; i++) {
            int abs = Math.abs(c - arr[i]);
            if (abs<min){
                minI=i;
                min=abs;
            }
        }
        System.out.println(minI);
    }
}
